#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int i = 0;
	int j = 0;
	int arr[][10] = { 0 };
	arr[0][0] = 1;
	for (i = 0;i <10;i++)
	{
		for (j = 0;j <= i;j++)
		{
			arr[i][0] = 1;
			arr[i][i] = 1;
			if (i == j)
				arr[i - 1][j] = 0;
			if (i >= 1&&j>=1)
			{
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			}
			printf("%d ", arr[i][j]);
		}
		printf("\n");
	}


	return 0;
}